#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2015-03-30 00:10:31
# @Author  : Your Name (you@example.org)
# @Link    : http://example.org
# @Version : $Id$

from framework.db.basedb import BaseDb
from tornado import gen

class Test(BaseDb):
    database = 'db_heaven'
    table = 't_crawler'

    @classmethod
    def getInstance(self):
        return Test()

    @gen.coroutine
    def getAll(self):
        try:
            cur = yield self.execute("SELECT * FROM tp_product_seckill")
            raise gen.Return(cur.fetchall())
        except Exception, e:
            raise e



